/*
 * @Description: 
 * @Version: 1.0
 * @Author: wenbin
 * @Date: 2021-08-10 15:53:21
 * @LastEditors: wenbin
 * @LastEditTime: 2021-08-18 15:51:42
 * @FilePath: /appstore-admin-ui/src/api/appManage.js
 * Copyright (C) 2021 wenbin. All rights reserved.
 */
const MAGUS_APPSTOREADMIN_API = process.env.VUE_APP_MAGUS_APPSTOREADMIN_API;

const appManageApi = {
  // 获取所有协议
  getAllProtocol:  `${MAGUS_APPSTOREADMIN_API}/protocols/all`,
  // 获取所有设备厂家
  getAllManus:  `${MAGUS_APPSTOREADMIN_API}/manus/all`,
  // 获取所有设备型号
  getAllSpeModels:  `${MAGUS_APPSTOREADMIN_API}/speModels/all`,
  // 获取所有产品
  getAllProducts:  `${MAGUS_APPSTOREADMIN_API}/products/all`,
  // 获取所有支持项
  getAllSupport:  `${MAGUS_APPSTOREADMIN_API}/supportItems/all`,
  // 获取所有平台
  getAllPlat:  `${MAGUS_APPSTOREADMIN_API}/platforms/all`,
  // 获取分组树
  getGroupTree: `${MAGUS_APPSTOREADMIN_API}/appGroups/tree`,
  // 获取应用列表
  getApps: `${MAGUS_APPSTOREADMIN_API}/apps`,
  // 新增应用
  addApps: `${MAGUS_APPSTOREADMIN_API}/apps`,
  // 应用上下架
  appOnline: (id) => `${MAGUS_APPSTOREADMIN_API}/apps/online/${id}`,
  // 获取数据
  getAppInfo: (id) => `${MAGUS_APPSTOREADMIN_API}/apps/load/${id}`,
  // 编辑
  editAppByid: (id) => `${MAGUS_APPSTOREADMIN_API}/apps/${id}`,
  // 获取评论
  getCommentsList: (id) => `${MAGUS_APPSTOREADMIN_API}/apps/comment/${id}`,
  // 删除评论
  deleteComments: `${MAGUS_APPSTOREADMIN_API}/apps/comment`,
  // 新增应用版本
  addAppVersion: `${MAGUS_APPSTOREADMIN_API}/apps/file/upload`,
  // 获取版本列表
  getAppversionById:  (id) => `${MAGUS_APPSTOREADMIN_API}/apps/version/${id}`,
  // 获取历史版本列表
  getHistoryVersion: (id) => `${MAGUS_APPSTOREADMIN_API}/apps/version/history/${id}`
}

export default appManageApi;